﻿@model IEnumerable<HotelMgr.Models.Order>
@using Telerik.Web.Mvc.UI
@using HotelMgr.Models
@{
    ViewBag.Title = "Index";
}

<h2 style="text-align: center;font-size: 20px;font-weight: bolder;">订单管理</h2>

@*<p>
    @Html.ActionLink("Create New", "Create")
</p>*@
@(Html.Telerik().Grid(Model)
.Name("OrderGrid")
.Columns(o=>
             {
                 o.Bound(i => i.OrderID);
                 o.Bound(i => i.Customer.Name);
                 o.Bound(i => i.OrderTime);
                 o.Bound(i => i.CheckInTime);
                 o.Bound(i => i.CheckOutTime);
                 o.Bound(i => i.PeopleNumber);
                 o.Bound(i => i.Status);
                 o.Bound(i => i.ActualPrice);
                 o.Bound(i => i.Comment);
                 o.Template(@<text>
                                 @Html.ActionLink("修改","Edit",new {id=item.OrderID},null)
                                 @Html.ActionLink("详细", "Details", new {id = item.OrderID},null) 
                                 @Html.ActionLink("删除", "Delete", new {id = item.OrderID},null)
                             </text>).Title("操作");
             })
             .Pageable()
             .Scrollable(s=>s.Enabled(true))
             .Footer(true)
)

